﻿<UserControl 
             x:Class="SkyShell.BusyAnimation" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" d:DesignHeight="6" d:DesignWidth="600" Background="{x:Null}" SizeChanged="BusyAnimation_SizeChanged">
    <Grid>
        <Grid.ColumnDefinitions>
        </Grid.ColumnDefinitions>
        <Rectangle x:Name="Rectangle" Fill="White" Height="5" Width="5" RadiusX="2" RadiusY="2" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left">
            <Rectangle.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard RepeatBehavior="Forever" FillBehavior="Stop">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Rectangle" SpeedRatio="1.5" FillBehavior="HoldEnd">
                                <EasingDoubleKeyFrame x:Name="KeyFrame1" KeyTime="0" Value="-10"/>
                                <EasingDoubleKeyFrame x:Name="KeyFrame2" KeyTime="0:0:1" Value="330"/>
                                <EasingDoubleKeyFrame x:Name="KeyFrame3" KeyTime="0:0:4" Value="660"/>
                                <EasingDoubleKeyFrame x:Name="KeyFrame4" KeyTime="0:0:5" Value="1000"/>
                                <EasingDoubleKeyFrame x:Name="KeyFrame5" KeyTime="0:0:6" Value="1000"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Rectangle.Triggers>
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Rectangle.RenderTransform>
        </Rectangle>
    </Grid>
</UserControl> 
